//
//  HLLiveMessageModel.m
//  YueYue
//
//  Created by hulu001 on 2024/3/12.
//

#import "HLLiveMessageModel.h"

@implementation HLLiveMessageModel


+ (NSString *)randomID
{
    return [NSString stringWithFormat:@"%d%d%.f", arc4random() % 1000, arc4random() % 1000, [[NSDate date] timeIntervalSince1970]];
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        _messageId = [HLLiveMessageModel randomID];
    }
    return self;
}

- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
{
    if ([property.name isEqualToString:@"ext"]) {
        return [HLLiveMessageExtModel mj_objectWithKeyValues:oldValue];
    }
    
    return oldValue;
}


@end
